package com.sptpc.demo.service.impl;

import com.sptpc.demo.model.Vet;
import com.sptpc.demo.repository.CategoryRepository;
import com.sptpc.demo.repository.VetRepository;
import com.sptpc.demo.service.IVetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class VetJpaService implements IVetService {
    @Autowired
    public VetRepository vetRepository;
    @Override
    public List<Vet> getAllVets() {
        return vetRepository.findAll();
    }

    @Override
    public void addNewVet(Vet vet) {
        vetRepository.save(vet);
    }
}
